import request from ".";

//获取商家列表
export const allMerchantList = () => {
  return request({
    url: "/manageBusiness/getBusiness",
    method: "get",
  });
};

// //删除商家
export const deleteMerchant = (business_id) => {
  return request({
    url: "/manageBusiness/deleteBusiness",
    method: "post",
    data: {
      business_id: business_id,
    },
  });
};

// //搜索商家
export const SearchMerchant = (keyword) => {
  return request({
    url: "/manageBusiness/findBusiness",
    method: "get",
    params: {
      b_name: keyword,
    },
  });
};


//审核商家
export const updateStatus = (check_id,pass_status) => {
  console.log('check_id',check_id);
  console.log('check_status',pass_status);

  return request({
    url: "/manageBusiness/updateCheck",
    method: "post",
    data: {
      check_id: check_id,
      pass_status:pass_status
    },
  });
};

//查看申请审核的商家
export const getApply = () => {
  return request({
    url: "/manageBusiness/checkList",
    method: "get",

  });
};
